package com.example.base;

import java.io.IOException;

public class Shutdown {
    // 默认3秒后关机
    public static void shutdown() {
        // 关机
        try {
            Runtime.getRuntime().exec("shutdown /s /t  3");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        shutdown();
    }
}
